package kingwing.dc.core.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.MappedSuperclass;

import org.hibernate.annotations.GenericGenerator;

import com.bstek.dorado.annotation.PropertyDef;

/**
 * 所有业务实体类的基类(包含必备字段)
 * @author Kevin
 * 2017年8月8日
 */
@MappedSuperclass
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public class BaseEntity implements Serializable{

	private static final long serialVersionUID = 1L;
	
	@Id
	@Column(name = "ID_", length = 60)
	@GeneratedValue(generator = "uuid")
	@GenericGenerator(name = "uuid", strategy = "uuid.hex")
	private String id;
	@PropertyDef(label="创建人ID")
	@Column(name = "CREATE_USER_ID_", length = 60)
	private String createUserId;
	@PropertyDef(label="创建人")
	@Column(name = "CREATE_USER_", length = 60)
	private String createUser;
	@PropertyDef(label="创建日期")
	@Column(name = "CREATE_DATE_")
	private Date createDate;
	@PropertyDef(label="修改人")
	@Column(name = "UPDATE_USER_", length = 60)
	private String updateUser;
	@PropertyDef(label="修改日期")
	@Column(name = "UPDATE_DATE_")
	private Date updateDate;
	@PropertyDef(label="备注")
	@Column(name = "REMARK_")
	private String remark;
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getCreateUser() {
		return createUser;
	}
	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	public String getUpdateUser() {
		return updateUser;
	}
	public void setUpdateUser(String updateUser) {
		this.updateUser = updateUser;
	}
	public Date getUpdateDate() {
		return updateDate;
	}
	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public String getCreateUserId() {
		return createUserId;
	}
	public void setCreateUserId(String createUserId) {
		this.createUserId = createUserId;
	}
}
